$("form").on("submit", function (e) {
    e.preventDefault();
    const data = $("form").serialize()
    console.log(data)
    $.post("http://localhost:8888/users/login", data, res => {
        console.log(res);

        if (res.code === 0) {
            $("form>span").css("display", "block");
            return;
        }
        window.localStorage.setItem("token",res.token);
        window.localStorage.setItem("id",res.user.id)
        window.location.href = "./index.html";
    })


})